package com.example.calculators;

public class MyObject {

    private static MyObject object;

    public void showObject(){
        System.out.println("我的对象："+this.getClass());
    }

    public static MyObject getObject() {
         if (object==null)
             object=new MyObject();
        return object;
    }
    public static void main(String[] args){
        MyObject.getObject().showObject();
    }
}
